package com.easyidea.its.web.dto;

import java.io.Serializable;
import java.util.List;

import com.easyidea.its.domain.model.system.PassPort;

/**
 * 
 * @author hukn
 *
 */
public class SeesionUserDto implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5515490588370438859L;

	private Integer userId;

	private String userName;

	private String userDisplayName;

	private List<Integer> permissionIdList;
	
	private List<String> permissionUrlList;
	
	private List<PassPort> passPortList;
	
	private String departmentName;
	
	private Integer deptId;
	
	public Integer getDeptId() {
		return deptId;
	}
	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}
	public List<Integer> getPermissionIdList() {
		return permissionIdList;
	}
	public void setPermissionIdList(List<Integer> permissionIdList) {
		this.permissionIdList = permissionIdList;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public List<String> getPermissionUrlList() {
		return permissionUrlList;
	}

	public void setPermissionUrlList(List<String> permissionUrlList) {
		this.permissionUrlList = permissionUrlList;
	}

	public String getUserDisplayName() {
		return userDisplayName;
	}

	public void setUserDisplayName(String userDisplayName) {
		this.userDisplayName = userDisplayName;
	}

	public boolean hasPermission(Integer permissionId) {
		if (permissionId == null || this.permissionIdList == null) {
			return false;
		}
		for (Integer permid : this.permissionIdList) {
			if (permissionId.equals(permid)) {
				return true;
			}
		}
		return false;
	}
	public List<PassPort> getPassPortList() {
		return passPortList;
	}
	public void setPassPortList(List<PassPort> passPortList) {
		this.passPortList = passPortList;
	}
	public String getDepartmentName() {
		return departmentName;
	}
	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}
}
